package zhtt.main;

import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by zhtt on 2016/10/28.
 */
@EnableAutoConfiguration
@Configuration
@ComponentScan
@RestController
public class Application {

    @RequestMapping(value = "/spring/boot",produces = "text/html;charset=utf-8")
    private String view() {
        return "访问成功！";
    }

    public static void main(String[] args) {
        SpringApplication.run(Application.class);
		/*
		运行后访问：http://localhost:8080/spring/boot
		默认端口为：8080
		 */
    }
}
